$(function() {
	$('#vue_vm_list div').hide();
});

viewMealsCostRecordMonth_findAll();

function viewMealsCostRecordMonth_findAll() {
	if($('#vue_vm_list div').length==0) {return;}
	$('#vue_vm_list div').hide();

	findAll_basic(path+'/viewMealsCostRecordMonth/findAll', function(response) {
		$('#vue_vm_list').html(gl_vue_vm_list_html);
		
		new Vue({
			el: '#vue_vm_list',
			data: {
				todos: response.data
			},
			methods: {
				withdrawApply_save:function(todo) {
					var withdrawApply = {};
					withdrawApply.accountsMonth = todo.payMonth;
					withdrawApply.withdrawMoney = todo.payMoneyTotal;
					withdrawApply.applyId = getLoginedUser().staffId;
					
					if(confirm('确实要申请提现吗？')) {
						save_basic(path+'/withdrawApply/save', {withdrawApply:withdrawApply}, function() {
							alert('申请提交成功');
						});
					}
				}
			}
		});
		
		$('#vue_vm_list div').show();
	});
}